﻿using Autofac;
using Sayook.Framework.AutoLibrary;
using Sayook.Framework.Model;

namespace Sayook.Framework.TemplateApi
{
    /// <summary>
    /// 注册服务
    /// </summary>
    public class AutofacModule : Module
    {
        /// <summary>
        /// 加载服务组件
        /// </summary>
        /// <param name="builder"></param>
        protected override void Load(ContainerBuilder builder)
        {
            builder.Register(c => new ApiInterfaceCode(TemplateApiCode.KeyValues)).SingleInstance();
            builder.Register(c => new AutofacManager()).SingleInstance();
        }
    }
}